/**
 * 
 */
package org.t2.game.server.module.data.model;

import org.banish.sql.core.annotation.Column;
import org.banish.sql.core.annotation.Index;
import org.banish.sql.core.annotation.Table;
import org.banish.sql.core.annotation.enuma.AsyncType;
import org.banish.sql.core.annotation.enuma.IndexType;
import org.gaming.service.repository.annotation.JvmCache;
import org.gaming.service.service.jvm.PlayerOneToManyEntity;
import org.springframework.stereotype.Repository;

/**
 * @author YY
 */
@Repository
@JvmCache(relation = { "playerId", "dataType", "dataId" })
@Table(comment = "数据表", dbAlias = "game", asyncType = AsyncType.UPDATE, asyncSize = 200, asyncDelay = 30, indexs = {
		@Index(fields = { "playerId", "dataType", "dataId" }, type = IndexType.UNIQUE) })
public class Data extends PlayerOneToManyEntity {
	@Column(comment = "数据类型", readonly = true)
	private String dataType;
	@Column(comment = "数据ID", readonly = true)
	private int dataId;
	@Column(comment = "密文数据", extra = "text")
	private String data;
	@Column(comment = "明文数据", extra = "text")
	private String plaintext;
	
	public String getDataType() {
		return dataType;
	}
	public void setDataType(String dataType) {
		this.dataType = dataType;
	}
	public int getDataId() {
		return dataId;
	}
	public void setDataId(int dataId) {
		this.dataId = dataId;
	}
	public String getData() {
		return data;
	}
	public void setData(String data) {
		this.data = data;
	}
	public String getPlaintext() {
		return plaintext;
	}
	public void setPlaintext(String plaintext) {
		this.plaintext = plaintext;
	}
}
